﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="expsearch.ascx.cs" Inherits="ZF.WS.UserControls.expsearch" %>
<div class="board   lrsearch expsearch">
    <dl>
        <dt><span>专家搜索</span> </dt>
        <dd>
            <table class="w100_  ">
                <tr class="dt">
                    <td class='t'>
                        专家顾问类别:
                    </td>
                    <td class='c'>
                        <select class="ddl ddltype">
                            <option value="0">不限</option>
                            <zf:ListView runat="server" ID="lvType">
                                <LayoutTemplate>
                                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                    </zf:PlaceHolder>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <option value="<%#Eval("Key") %>">
                                        <%#Eval("Text") %></option>
                                </ItemTemplate>
                            </zf:ListView>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class='t'>
                        区域:
                    </td>
                    <td class='c'>
                        <select class="ddl ddlarea">
                            <option value="0">不限</option>
                            <zf:ListView runat="server" ID="lvArea">
                                <LayoutTemplate>
                                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                    </zf:PlaceHolder>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <option value="<%#Eval("Text") %>">
                                        <%#Eval("Text") %></option>
                                </ItemTemplate>
                            </zf:ListView>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class='t'>
                        专家顾问姓名:
                    </td>
                    <td class='c'>
                        <input type="text" class="stxt name" />
                    </td>
                </tr>
                <tr>
                    <td class='t'>
                         公司单位关键字:
                    </td>
                    <td class='c'>
                        <input type="text" class="stxt company" />
                    </td>
                </tr>
                <tr>
                    <td class='t'>
                        电话:
                    </td>
                    <td class='c'>
                        <input type="text" class="stxt tel" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                        <input type="button" value=" 搜 索 " class="btSearch" /> <a href="/service/zxgz.aspx" target="_blank">在线咨询规则</a>
                    </td>
                </tr>
            </table>
        </dd>
    </dl>
</div>

<script>
    $(function() {
    var infosearch = $(".expsearch");
        infosearch.find(".btSearch").click(function() {
            var param = "1=1";
            if (infosearch.find(".ddltype")[0].value != "0")
                param += "&type=" + infosearch.find(".ddltype")[0].value;
            if (infosearch.find(".ddlarea")[0].value != "0")
                param += "&area=" + escape(infosearch.find(".ddlarea")[0].value);
                
            if ($.trim(infosearch.find(".name").val()) != "")
                param += "&name=" + escape(infosearch.find(".name").val());

            if ($.trim(infosearch.find(".company").val()) != "")
                param += "&company=" + escape(infosearch.find(".company").val());
            if ($.trim(infosearch.find(".tel").val()) != "")
                param += "&tel=" + escape(infosearch.find(".tel").val());
            window.location = "/expert/list.aspx?" + param;
        });
    });
</script>

